package com.springcloud.eureka_consumer.remote.interfaces;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.springcloud.eureka_consumer.remote.impl.UserRemoteHystrix;

//provider-user（名称中不能使用下划线），是在eureka中注册的服务提供者实例名,fallback申明服务调用异常后的熔断处理类
@FeignClient(name="provider-user",fallback=UserRemoteHystrix.class)
public interface UserRemoteI {
//	调用服务提供者全路径为 provider-user/user/{id}
	@RequestMapping("/user/{id}")
	public Object getUser(@PathVariable("id") int id);

}
